<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Phing API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="js/jquery.tools.min.js"></script><script type="text/javascript" src="js/jquery.cookie.js"></script><script type="text/javascript" src="js/jquery.treeview.js"></script><script type="text/javascript">
            $(document).ready(function() {
                $(".filetree").treeview({
                    collapsed: true,
                    persist: "cookie"
                });

                $("#accordion").accordion({
                    collapsible: true,
                    autoHeight:  false,
                    fillSpace:   true
                });

                $(".tabs").tabs();
            });
        </script></head><body><div xmlns="" id="content">
<script xmlns:dbx="http://docblox-project.org/xsl/functions">

      function filterElements()
      {
        inherited = !$('#show-inherited').hasClass('deselected');
        public    = !$('#show-public').hasClass('deselected');
        protected = !$('#show-protected').hasClass('deselected');
        private   = !$('#show-private').hasClass('deselected');

        $('div.public').each(function(index, val) {
            $(val).toggle(public && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.protected').each(function(index, val) {
            $(val).toggle(protected && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.private').each(function(index, val) {
            $(val).toggle(private && !($(val).hasClass('inherited_from') && !inherited));
        });
      }

      $(document).ready(function() {
        $('a.gripper').click(function() {
            $(this).nextAll('div.code-tabs').slideToggle();
            $(this).children('img').toggle();
            return false;
        });

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').css('cursor', 'pointer');

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').click(function() {
            $(this).parent().nextAll('div.code-tabs').slideToggle();
            $(this).parent().prevAll('a.gripper').children('img').toggle();
            return false;
        });

        $('div.code-tabs').hide();
        $('a.gripper').show();
        $('div.code-tabs:empty').prevAll('a.gripper').html('');

        $('#show-public, #show-protected, #show-private, #show-inherited')
            .css('cursor', 'pointer')
            .click(function(){
                $(this).toggleClass('deselected');
                if ($(this).hasClass('deselected')) {
                  $(this).fadeTo('fast', '0.4');
                } else {
                  $(this).fadeTo('fast', '1.0');
                }
                filterElements();
                return false;
            });
        $('#show-protected, #show-private').click();

        // add the sliding behaviour to the file navigation and show it
        // it is initially hidden for non-JS users.
        $("#file-nav-box").show().hover(function() {
            $("#file-nav-container").slideDown(400);
        }, function() {
            $("#file-nav-container").slideUp(400);
        });
      });

      
    </script><h1 xmlns:dbx="http://docblox-project.org/xsl/functions" class="file">types/selectors/SelectorUtils.php</h1>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" id="file-nav-box">
<div id="file-nav-options">
              Show:
              <img src="images/icons/visibility_public.png" id="show-public"><img src="images/icons/visibility_protected.png" id="show-protected"><img src="images/icons/visibility_private.png" id="show-private"><span class="attribute" id="show-inherited">inherited</span>
</div>
<div id="file-nav-container">
<ul id="file-nav"><li>
<a href="#classes"><img src="images/icons/class.png" height="14">
                          Classes
                      </a><ul><li><a href="#%5CSelectorUtils">\SelectorUtils</a></li></ul>
</li></ul>
<div style="clear: left;"></div>
</div>
<div id="file-nav-tab">
              Table of Contents
          </div>
</div>
<a xmlns:dbx="http://docblox-project.org/xsl/functions" name="top" class="anchor"></a><div id="file-description">
<p xmlns:dbx="http://docblox-project.org/xsl/functions" class="short-description">&lt;p&gt;This is a utility class used by selectors and DirectoryScanner. The
functionality more properly belongs just to selectors, but unfortunately
DirectoryScanner exposed these as protected methods. Thus we have to
support any subclasses of DirectoryScanner that may access these methods.</p>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="long-description"><p></p></p>

<p>This is a Singleton.</p></div>
</div>
<dl class="file-info">
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Author</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">Hans Lellelid, hans@xmpl.org (Phing)
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Author</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">Arnout J. Kuiper, ajkuiper@wxs.nl (Ant)
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Author</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">Magesh Umasankar
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Author</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">Bruce Atherton, bruce@callenish.com (Ant)
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Package</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">phing.types.selectors
         
    </dd>
</dl>
<a name="classes" class="anchor"></a><a xmlns:dbx="http://docblox-project.org/xsl/functions" id="\SelectorUtils" class="anchor"></a><h2 xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">\SelectorUtils<div class="to-top"><a href="#top">jump to top</a></div>
</h2>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">
<small class="package"><b>Package: </b>phing\types\selectors</small><p class="short-description">&lt;p&gt;This is a utility class used by selectors and DirectoryScanner. The
functionality more properly belongs just to selectors, but unfortunately
DirectoryScanner exposed these as protected methods. Thus we have to
support any subclasses of DirectoryScanner that may access these methods.</p>
<div class="long-description"><p></p></p>

<p>This is a Singleton.</p></div>
<dl class="class-info">
<dt>Author</dt>
<dd>Hans Lellelid, hans@xmpl.org (Phing)
         
    </dd>
<dt>Author</dt>
<dd>Arnout J. Kuiper, ajkuiper@wxs.nl (Ant)
         
    </dd>
<dt>Author</dt>
<dd>Magesh Umasankar
         
    </dd>
<dt>Author</dt>
<dd>Bruce Atherton, bruce@callenish.com (Ant)
         
    </dd>
</dl>
<h3>Properties</h3>
<div>
<a id="\SelectorUtils::$instance" class="anchor"></a><div class="property private">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_private.png" style="margin-right: 5px" alt="private">
                 <span class="highlight">$instance</span>= ''
                </code><div class="description"><span class="attribute">static</span></div>
<div class="code-tabs">
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>n/a</dd>
</dl>
</div>
<div class="clear"></div>
</div>
</div>
<h3>Methods</h3>
<div>
<a id="\SelectorUtils::getInstance()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getInstance</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description">
<span class="attribute">static</span><p class="short_description">Retrieves the instance of the Singleton.</p>
</div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
<a id="\SelectorUtils::isOutOfDate()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">isOutOfDate</span><span class="nb-faded-text">(
          <a href="db_system_io_PhingFile.html#%5CPhingFile">\PhingFile</a> $src, <a href="db_system_io_PhingFile.html#%5CPhingFile">\PhingFile</a> $target, int $granularity
          )
        </span>
        :
          \whether</code><div class="description">
<span class="attribute">static</span><p class="short_description">Returns dependency information on these two files. If src has been
modified later than target, it returns true. If target doesn't exist,
it likewise returns true. Otherwise, target is newer than src and
is not out of date, thus the method returns false. It also returns
false if the src file doesn't even exist, since how could the
target then be out of date.</p>
</div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$src</th>
<td><a href="db_system_io_PhingFile.html#%5CPhingFile">\PhingFile</a></td>
<td><em><p>the original file</p></em></td>
</tr>
<tr>
<th>$target</th>
<td><a href="db_system_io_PhingFile.html#%5CPhingFile">\PhingFile</a></td>
<td><em><p>the file being compared against</p></em></td>
</tr>
<tr>
<th>$granularity</th>
<td>int</td>
<td><em><p>the amount in seconds of slack we will give in determining out of dateness</p></em></td>
</tr>
</table>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>\whether</td>
<td>the target is out of date</td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\SelectorUtils::match()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">match</span><span class="nb-faded-text">(
          \pattern $pattern, \str $str, \isCaseSensitive $isCaseSensitive
              =
              true
          )
        </span>
        :
          \&lt;code&gt;true&lt;/code&gt;</code><div class="description">
<span class="attribute">static</span><p class="short_description">Tests whether or not a string matches against a pattern.</p>
</div>
<div class="code-tabs">
<div class="long-description"><p>The pattern may contain two special characters:<br>
'*' means zero or more characters<br>
'?' means one and only one character</p></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$pattern</th>
<td>\pattern</td>
<td><em><p>The pattern to match against. Must not be <code>null</code>.</p>
</em></td>
</tr>
<tr>
<th>$str</th>
<td>\str</td>
<td><em><p>The string which must be matched against the pattern. Must not be <code>null</code>.</p>
</em></td>
</tr>
<tr>
<th>$isCaseSensitive</th>
<td>\isCaseSensitive</td>
<td><em><p>Whether or not matching should be performed case sensitively.</p></em></td>
</tr>
</table>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>\&lt;code&gt;true&lt;/code&gt;</td>
<td>if the string matches against the pattern, or &lt;code&gt;false&lt;/code&gt; otherwise.</td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\SelectorUtils::matchPath()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">matchPath</span><span class="nb-faded-text">(
          \pattern $pattern, \str $str, \isCaseSensitive $isCaseSensitive
              =
              true
          )
        </span>
        :
          \&lt;code&gt;true&lt;/code&gt;</code><div class="description">
<span class="attribute">static</span><p class="short_description">Tests whether or not a given path matches a given pattern.</p>
</div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$pattern</th>
<td>\pattern</td>
<td><em><p>The pattern to match against. Must not be <code>null</code>.</p>
</em></td>
</tr>
<tr>
<th>$str</th>
<td>\str</td>
<td><em><p>The path to match, as a String. Must not be <code>null</code>.</p>
</em></td>
</tr>
<tr>
<th>$isCaseSensitive</th>
<td>\isCaseSensitive</td>
<td><em><p>Whether or not matching should be performed case sensitively.</p></em></td>
</tr>
</table>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>\&lt;code&gt;true&lt;/code&gt;</td>
<td>if the pattern matches against the string, or &lt;code&gt;false&lt;/code&gt; otherwise.</td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\SelectorUtils::matchPatternStart()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">matchPatternStart</span><span class="nb-faded-text">(
          \pattern $pattern, \str $str, \isCaseSensitive $isCaseSensitive
              =
              true
          )
        </span>
        :
          \whether</code><div class="description">
<span class="attribute">static</span><p class="short_description">Tests whether or not a given path matches the start of a given
pattern up to the first "**".</p>
</div>
<div class="code-tabs">
<div class="long-description"><p>&lt;</p>

<p>p>
This is not a general purpose test and should only be used if you
can live with false positives. For example,</p>

<pre><code>pattern=**\a</code></pre>

<p>and</p>

<pre><code>str=b</code></pre>

<p>will yield</p>

<pre><code>true</code></pre>

<p>.</p></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$pattern</th>
<td>\pattern</td>
<td><em><p>The pattern to match against. Must not be <code>null</code>.</p>
</em></td>
</tr>
<tr>
<th>$str</th>
<td>\str</td>
<td><em><p>The path to match, as a String. Must not be <code>null</code>.</p>
</em></td>
</tr>
<tr>
<th>$isCaseSensitive</th>
<td>\isCaseSensitive</td>
<td><em><p>Whether or not matching should be performed case sensitively.</p></em></td>
</tr>
</table>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>\whether</td>
<td>or not a given path matches the start of a given pattern up to the first "**".</td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<small xmlns="" class="footer">Documentation was generated by <a href="http://docblox-project.org">DocBlox 0.17.1</a>.
    </small></body></html>
